<!---->
<%= form_for(:session, :url => {:action => 'update'}, :method => 'put', :html => {:class=>'form-horizontal'}) do |t| %>
	<fieldset>
		<legend>
    <%= link_to '活动列表', events_path %>
    </legend>
  <div class="control-group">
    <label class="control-label">名称</label>
    <div class="controls">
    <%= t.text_field :title, :value => @event.title %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">分类</label>
    <div class="controls">
      <%= select_tag "session[category]", options_from_collection_for_select(@esort, 'id', 'title', @event.category) %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">链接</label>
    <div class="controls">
    <%= t.text_field :linkto, :value => @event.linkto %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">装备图片</label>
    <div class="controls">
      <%= image_tag @event.image_url(:preview).to_s %><br />
      <%= t.file_field :image %>
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <input type="hidden" name="id" id="id" value="<%= @event.id %>" />
      <button type="submit" class="btn">修改</button>
    </div>
  </div>
</fieldset>
<% end %>
<!---->
